#version 120
uniform mat4 MVPMatrix;
uniform int resolution;
uniform mat4 ModelView;

void main()
{
        vec4 pos = MVPMatrix * ModelView * gl_Vertex;
        gl_Position = MVPMatrix * ModelView * gl_Vertex;

        float radius = pos.z*pos.z;
        gl_PointSize = radius / (512.0 / resolution) / 1.0;
}
